// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * CatalogruleProduct generated by hbm2java
 */
@Entity
@Table(name = "catalogrule_product", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"rule_id", "from_time", "to_time", "website_id", "customer_group_id",
		"product_id", "sort_order" }))
public class CatalogruleProduct implements java.io.Serializable {

	private Integer ruleProductId;
	private CoreWebsite coreWebsite;
	private Catalogrule catalogrule;
	private CustomerGroup customerGroup;
	private CatalogProductEntity catalogProductEntity;
	private int fromTime;
	private int toTime;
	private String actionOperator;
	private BigDecimal actionAmount;
	private short actionStop;
	private int sortOrder;

	public CatalogruleProduct() {
	}

	public CatalogruleProduct(CoreWebsite coreWebsite, Catalogrule catalogrule,
			CustomerGroup customerGroup,
			CatalogProductEntity catalogProductEntity, int fromTime,
			int toTime, BigDecimal actionAmount, short actionStop, int sortOrder) {
		this.coreWebsite = coreWebsite;
		this.catalogrule = catalogrule;
		this.customerGroup = customerGroup;
		this.catalogProductEntity = catalogProductEntity;
		this.fromTime = fromTime;
		this.toTime = toTime;
		this.actionAmount = actionAmount;
		this.actionStop = actionStop;
		this.sortOrder = sortOrder;
	}

	public CatalogruleProduct(CoreWebsite coreWebsite, Catalogrule catalogrule,
			CustomerGroup customerGroup,
			CatalogProductEntity catalogProductEntity, int fromTime,
			int toTime, String actionOperator, BigDecimal actionAmount,
			short actionStop, int sortOrder) {
		this.coreWebsite = coreWebsite;
		this.catalogrule = catalogrule;
		this.customerGroup = customerGroup;
		this.catalogProductEntity = catalogProductEntity;
		this.fromTime = fromTime;
		this.toTime = toTime;
		this.actionOperator = actionOperator;
		this.actionAmount = actionAmount;
		this.actionStop = actionStop;
		this.sortOrder = sortOrder;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "rule_product_id", unique = true, nullable = false)
	public Integer getRuleProductId() {
		return this.ruleProductId;
	}

	public void setRuleProductId(Integer ruleProductId) {
		this.ruleProductId = ruleProductId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "website_id", nullable = false)
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "rule_id", nullable = false)
	public Catalogrule getCatalogrule() {
		return this.catalogrule;
	}

	public void setCatalogrule(Catalogrule catalogrule) {
		this.catalogrule = catalogrule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_group_id", nullable = false)
	public CustomerGroup getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(CustomerGroup customerGroup) {
		this.customerGroup = customerGroup;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "from_time", nullable = false)
	public int getFromTime() {
		return this.fromTime;
	}

	public void setFromTime(int fromTime) {
		this.fromTime = fromTime;
	}

	@Column(name = "to_time", nullable = false)
	public int getToTime() {
		return this.toTime;
	}

	public void setToTime(int toTime) {
		this.toTime = toTime;
	}

	@Column(name = "action_operator", length = 10)
	public String getActionOperator() {
		return this.actionOperator;
	}

	public void setActionOperator(String actionOperator) {
		this.actionOperator = actionOperator;
	}

	@Column(name = "action_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getActionAmount() {
		return this.actionAmount;
	}

	public void setActionAmount(BigDecimal actionAmount) {
		this.actionAmount = actionAmount;
	}

	@Column(name = "action_stop", nullable = false)
	public short getActionStop() {
		return this.actionStop;
	}

	public void setActionStop(short actionStop) {
		this.actionStop = actionStop;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

}
